<template>
  <div class="gbox">
    <h4>{{pmsg}}</h4>
  </div>
</template>

<script lang='ts'>
import {ref,reactive,inject} from 'vue'
export default{
 setup(){
  let pmsg=ref<string>()
  pmsg.value=inject('p-key')
  return{pmsg}
 }
}
</script>

<style lang='scss' scoped>
.gbox{
    width: 300px;
    height: 200px;
    background-color: springgreen;
  }
</style>